<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="functions.asp" -->
 
<%
'set cn=Server.CreateObject("ADODB.Connection")
'cn.Open "MP2ENTTEST2", "MP2", "MP2"
dim sql %>
<%
Dim EXIREG__tmpNum
EXIREG__tmpNum = "0"
if (request.querystring("seqnum") <> "") then EXIREG__tmpNum = request.querystring("seqnum")
%>
<%
set EXIREG = Server.CreateObject("ADODB.Recordset")
EXIREG.ActiveConnection = cn
EXIREG.Source = "SELECT SEQNUM, REGNUM, INVNUM, EMPCODE,VENDORID, PONUM,INVSTATUS, MULTIVERIFY,REFORDER,USERCOORD,INVAMOUNT,INVCURRENCY, "_
& "(SELECT EXCHANGERATE FROM EXCHRATE WHERE EXCHRATE.MP2CURRENCY=EXIREG.INVCURRENCY) AS FRATE, "_
& " CURRENCYSYMBOL, VERIFIEDBY, VERIFIEDSTATUS,DEPARTMENT, AUTHORISEDBY, LOCATION, APPROVEDBY,APPROVED2BY,JOINAPPROVAL,"_
& "INVRECDATE, INVDUEDATE, DATEVERIFIED,DATEAUTHORISED,DATEAPPROVED,DATEAPPROVED2,DATEAUTHORISED,REFERENCEDOC, "_
& "(SELECT TOP 1  VENDOR.NAME FROM VENDOR WHERE VENDOR.VENDORID=EXIREG.VENDORID) AS VENDORNAME, "_
& "(SELECT VERNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIREG.VERIFIEDBY) AS VERNAME,"_
& "(SELECT AUTHNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIREG.AUTHORISEDBY) AS AUTHNAME,"_
& "(SELECT APPRNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIREG.APPROVEDBY) AS APPRNAME,"_
& "(SELECT APPRNAME2=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIREG.APPROVED2BY) AS APPRNAME2,"_
& "(SELECT LOCNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIREG.LOCATION) AS LOCNAME,"_
& "USERDEPT,COMMENTS  FROM dbo.EXIREG  WHERE SEQNUM=" + Replace(EXIREG__tmpNum, "'", "''") + ""
'EXIREG.CursorType = 0
'EXIREG.CursorLocation = 2
'EXIREG.LockType = 3
EXIREG.Open()
EXIREG_numRows = 0
%>
<%
Dim InvHist__tmpNum
InvHist__tmpNum = "0"
if (Request.Querystring("seqnum") <> "") then InvHist__tmpNum = Request.Querystring("seqnum")
%>
<%
'(SELECT LOCNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIHIST.LOCATION) AS LOCNAME "
set InvHist = Server.CreateObject("ADODB.Recordset")
InvHist.ActiveConnection = cn
InvHist.Source = "SELECT *,  (SELECT TRDESCR FROM EXITRTYPE WHERE EXIHIST.TRANSTYPE=EXITRTYPE.TRTYPE) AS TRDESCR, (SELECT LOCNAME=CASE WHEN LASTNAME IS NOT NULL THEN EMP.FIRSTNAME + ' '  + EMP.LASTNAME WHEN LASTNAME IS NULL THEN EMP.FIRSTNAME END FROM dbo.EMP WHERE EMP.EMPCODE=EXIHIST.LOCATION) AS LOCNAME   FROM dbo.EXIHIST  WHERE SEQNUM=" + Replace(InvHist__tmpNum, "'", "''") + " ORDER BY ROWID"
'InvHist.CursorType = 0
'InvHist.CursorLocation = 2
'InvHist.LockType = 3
InvHist.Open()
InvHist_numRows = 0
%>
<%
Dim Verification__tmpNum
Verification__tmpNum = "0"
if (request.querystring("seqnum") <> "") then Verification__tmpNum = request.querystring("seqnum")
%>
<%
set Verification = Server.CreateObject("ADODB.Recordset")
Verification.ActiveConnection = cn
Verification.Source = "SELECT *  FROM dbo.EXIVERIFY  WHERE INVSEQNUM=" + Replace(Verification__tmpNum, "'", "''") + ""
'Verification.CursorType = 0
'Verification.CursorLocation = 2
'Verification.LockType = 3
Verification.Open()
Verification_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
InvHist_numRows = InvHist_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Repeat2__numRows = -1
Dim Repeat2__index
Repeat2__index = 0
Verification_numRows = Verification_numRows + Repeat2__numRows
%>
<%

Function get_Authorise(e)
'if (EXIREG.Fields.Item("APPROVEDBY").Value <> "") then
 sql = "SELECT  A.GROUPDESC, A.EMPCODE, B.CURRENCY, B.INVAMTPO, B.INVAMTNONPO"
 sql = sql & " FROM dbo.EXIAUTHORITY A, dbo.EXIAUTHFINANCE B"
 sql = sql & " WHERE A.GROUPDESC=B.GROUPDESC "
 sql = sql & " AND A.EMPCODE = '" & e & "'"
 set rs = cn.execute(sql)
 
do while not rs.eof
 if (EXIREG.Fields.Item("REFORDER").Value = "Y")or (EXIREG.Fields.Item("REFORDER").Value = "O")then
   if ((EXIREG.Fields.Item("INVAMOUNT").Value/EXIREG.Fields.Item("FRATE").Value) > rs("INVAMTPO")) then
     get_Authorise = "N"
   else
     get_Authorise = "Y"
   end if
 else
   if ((EXIREG.Fields.Item("INVAMOUNT").Value/EXIREG.Fields.Item("FRATE").Value) > rs("INVAMTNONPO")) then
     get_Authorise = "N"
   else
     get_Authorise = "Y"
   end if
 end if
 
rs.movenext
loop
set rs = nothing
'end if

end function



if (EXIREG.Fields.Item("APPROVEDBY").Value<>"")then
isAuthorised=get_Authorise(EXIREG.Fields.Item("APPROVEDBY").Value)
end if

if (EXIREG.Fields.Item("APPROVED2BY").Value<>"")then
isAuthorised=get_Authorise(EXIREG.Fields.Item("APPROVED2BY").Value)
end if

if(EXIREG.Fields.Item("JOINAPPROVAL").Value="Y") then
  caption1="Approved 1 By:"
  caption2="Approved 2 By:"
else
  caption1="Approved By:"
end if
%>
<SCRIPT Language = "JavaScript">

function DocLoad(){
var multiver='<%=(EXIREG.Fields.Item("MULTIVERIFY").Value)%>';
var joinAppr='<%=(EXIREG.Fields.Item("JOINAPPROVAL").Value)%>';
var isUC='<%= isUC %>';
var isAuthorised='<%= isAuthorised %>';

if (joinAppr=='N'){
  document.getElementById("Approved2").style.display='none';
  }
if (isAuthorised=='N'){
  document.getElementById("Authorise").style.display='block';
  }
else
  {
  document.getElementById("Authorise").style.display='none';
  document.form1.reqAuthorised.value=' ';
  }
}
</SCRIPT>
<!-- #include file="pagetop.asp" -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td nowrap height="21" bgcolor="#FFFFFF" width="3%" background="images/menu_end.gif">&nbsp;</td>
    <td nowrap height="21" bgcolor="#FFFFFF" width="28"> 
      <div align="center"><img src="images/menu_awal_off.gif" width="28" height="33"></div>
    </td>
    <td width="15%" background="images/menuoff.gif" height="21" nowrap> 
      <div align="center"><b><a href="<%= request.QueryString("referer") %>" class="menu">Outstanding 
        List </a></b></div>
    </td>
    <td nowrap height="21" width="28"><img src="images/menu_off_on_separator.gif" width="28" height="33"></td>
    <td width="15%" background="images/menuon.gif" height="21" nowrap> 
      <div align="center"><b class="menu">Detail</b></div>
    </td>
    <td height="21" bgcolor="#FFFFFF" width="11"><img src="images/Menu_onend.gif" width="13" height="33"></td>
    <td height="21" bgcolor="#FFFFFF" background="images/menu_end.gif"> 
      <div align="right"><font color="#003399"><b>Outstanding Invoice&nbsp;</b></font></div>
    </td>
  </tr>
  <tr bgcolor="#93bee2"> 
    <td height="21" width="3%" bgcolor="#93bee2">&nbsp;</td>
    <td height="21" width="28" bgcolor="#93bee2">&nbsp;</td>
    <td width="15%" height="21" bgcolor="#93bee2">&nbsp;</td>
    <td height="21" width="28">&nbsp;</td>
    <td width="15%" height="21">&nbsp;</td>
    <td height="21">&nbsp;</td>
    <td height="21">&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#93bee2">
  <tr> 
    <td width="4%" height="14">&nbsp;</td>
    <td width="2%" height="14">&nbsp;</td>
    <td width="94%" height="14">&nbsp; </td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="94%">&nbsp;</td>
  </tr>
  <tr> 
    <td width="4%" height="20">&nbsp;</td>
    <td width="2%" bgcolor="#FFFFFF" height="20"><img src="images/curv_data.gif" width="21" height="21"></td>
    <td bgcolor="#FFFFFF" height="20" width="94%">&nbsp;</td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="2%" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF" width="94%">&nbsp; </td>
  </tr>
  <tr> 
    <td width="4%">&nbsp;</td>
    <td width="2%" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF" width="94%"> 
      <form name="form1" method="post" action="Send_Notification.asp" >
        <table width="100%" border="0" cellspacing="2" cellpadding="3">
          <tr> 
            <td width="15%" bgcolor="#dedede" height="26"> 
              <div align="right"><b>Invoice No.:&nbsp;</b></div>
            </td>
            <td width="2%" height="26">&nbsp;</td>
            <td width="30%" height="26"> <%=(EXIREG.Fields.Item("INVNUM").Value)%> 
              <input type="hidden" name="referer" value="<%= request("referer") %>">
			  <input type="hidden" name="seqnum" value="<%=(EXIREG.Fields.Item("SEQNUM").Value)%>">
            </td>
            <td width="15%" bgcolor="#dedede" height="26"> 
              <div align="right"><b>Invoice Status:&nbsp;</b></div>
            </td>
            <td width="2%" height="26">&nbsp;</td>
            <td height="26"> <%=(EXIREG.Fields.Item("INVSTATUS").Value)%> </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Vendor ID:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td width="30%" height="25"> <%=(EXIREG.Fields.Item("VENDORID").Value)%> </td>
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Vendor Name:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td bgcolor="#FFFFFF" height="25"><%=(EXIREG.Fields.Item("VENDORNAME").Value)%></td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Reference Order:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td width="30%" height="25"> 
              <%if(EXIREG.Fields.Item("REFORDER").Value="Y") then %>
              <img src="images/check.jpg" width="18" height="17"> 
              <% else %>
              <img src="images/uncheck.jpg" width="14" height="14"> 
              <% end if %>
            </td>
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>PO/SO/CO No:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td bgcolor="#FFFFFF" height="25" width="36%"> <%=(EXIREG.Fields.Item("PONUM").Value)%> </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Invc. Received Date:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td width="30%" height="25"> <%=(DoDateTime((EXIREG.Fields.Item("INVRECDATE").Value), 1, 2057))%> </td>
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Invc. Due Date:</b>&nbsp;</div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td height="25"><%= DoDateTime((EXIREG.Fields.Item("INVDUEDATE").Value), 1, 2057) %> </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Department:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td height="25"><%=(EXIREG.Fields.Item("USERDEPT").Value)%> </td>
            <td height="25" bgcolor="#dedede"> 
              <div align="right"><b>Invoice Amount:&nbsp;</b></div>
            </td>
            <td height="25"><b></b></td>
            <td height="25"><b><%=(EXIREG.Fields.Item("CURRENCYSYMBOL").Value)%>&nbsp;&nbsp;<%= FormatNumber((EXIREG.Fields.Item("INVAMOUNT").Value), -1, -2, -2, -1) %></b></td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Original Invoice:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td colspan="4" height="25"><a href="javascript:opennew('<%=(EXIREG.Fields.Item("REFERENCEDOC").Value)%>')"><%=(EXIREG.Fields.Item("REFERENCEDOC").Value)%></a> </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF"> 
              <div align="right"><b> </b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td width="30%"> 
              <input type="button" name="Submit5" value="View Invoice" class="sbttn" onClick="opennew('<%=(EXIREG.Fields.Item("REFERENCEDOC").Value)%>')">
            </td>
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td> 
              <input type="hidden" name="VendorName" value="<%=(EXIREG.Fields.Item("VENDORNAME").Value)%>">
              <input type="hidden" name="InvoiceNo" value="<%=(EXIREG.Fields.Item("INVNUM").Value)%>">
              <input type="hidden" name="Reforder" value="<%=(EXIREG.Fields.Item("REFORDER").Value)%>">
            </td>
          </tr>
          <tr valign="middle" id="userVer" > 
            <td width="15%" valign="top"><b>User(s) Verification:</b></td>
            <td width="2%">&nbsp;</td>
            <td colspan="4">&nbsp;</td>
          </tr>
          <tr valign="middle"> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b>Verified By: 1.&nbsp;</b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> <%=(EXIREG.Fields.Item("VERIFIEDBY").Value)%> - <%=(EXIREG.Fields.Item("VERNAME").Value)%>
              <input type="hidden" name="reqEndUser" size="10" class="InputBox" value="<%=(EXIREG.Fields.Item("VERIFIEDBY").Value)%>" readOnly=true>
              &nbsp;&nbsp; 
              <input type="hidden" name="empName" size="30" class="InputBox" value="<%=(EXIREG.Fields.Item("VERNAME").Value)%>">
              &nbsp;&nbsp;&nbsp; 
              <% if (EXIREG.Fields.Item("VERIFIEDSTATUS").Value="VERIFIED") then %>
              <img src="images/check.jpg" width="18" height="17">&nbsp;Verified 
              &nbsp;&nbsp;<%= DoDateTime((EXIREG.Fields.Item("DATEVERIFIED").Value), 2, 2070) %> 
              <% end if %>
              <input type="hidden" name="Loc" size="15" class="InputBox" value="<%=(EXIREG.Fields.Item("LOCATION").Value)%>">
              <input type="hidden" name="LocName" value="<%=(EXIREG.Fields.Item("LOCNAME").Value)%>">
            </td>
          </tr>
          <% Incr = 1 %>
          <% 
While ((Repeat2__numRows <> 0) AND (NOT Verification.EOF)) 
%>
          <tr valign="middle"> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b><%= Incr+1 %>. </b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> <%=(Verification.Fields.Item("VERIFIEDBY").Value)%> - <%=(Verification.Fields.Item("VERNAME").Value)%>
              <input type="hidden" name="reqEndUser2" size="10" class="InputBox" value="<%=(Verification.Fields.Item("VERIFIEDBY").Value)%>" readonly=true>
              &nbsp;&nbsp; 
              <input type="hidden" name="empName2" size="30" class="InputBox" value="<%=(Verification.Fields.Item("VERNAME").Value)%>">
              &nbsp;&nbsp;&nbsp; 
              <% if (Verification.Fields.Item("VERIFYSTATUS").Value="VERIFIED") then %>
              <img src="images/check.jpg" width="18" height="17">&nbsp;Verified&nbsp;&nbsp;<%= DoDateTime((Verification.Fields.Item("DATEVERIFIED").Value), 2, 2070) %> 
              <% end if %>
            </td>
          </tr>
          <% Incr=incr + 1
  Repeat2__index=Repeat2__index+1
  Repeat2__numRows=Repeat2__numRows-1
  Verification.MoveNext()
Wend
%>
          <tr valign="middle"> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b><%= caption1 %>&nbsp;</b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> <%=(EXIREG.Fields.Item("APPROVEDBY").Value)%> - <%=(EXIREG.Fields.Item("APPRNAME").Value)%>
              <input type="hidden" name="reqApproved" size="10" class="InputBox" value="<%=(EXIREG.Fields.Item("APPROVEDBY").Value)%>" readonly=true>
              &nbsp;&nbsp; 
              <input type="hidden" name="ApprName" size="30" class="InputBox" value="<%=(EXIREG.Fields.Item("APPRNAME").Value)%>">
              &nbsp;&nbsp;&nbsp; 
              <% if (EXIREG.Fields.Item("DATEAPPROVED").Value<>"") then %>
              <img src="images/check.jpg" width="18" height="17">&nbsp;Approved 
              &nbsp;&nbsp;<%= DoDateTime((EXIREG.Fields.Item("DATEAPPROVED").Value), 2, 2070) %> 
              <% end if %>
              <input type="hidden" name="InvAmtNonPo">
              <input type="hidden" name="InvAmtPo">
            </td>
          </tr>
          <tr valign="middle" id="Approved2"> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b><%= caption2 %>&nbsp;</b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> <%=(EXIREG.Fields.Item("APPROVED2BY").Value)%> - <%=(EXIREG.Fields.Item("APPRNAME2").Value)%>
              <input type="hidden" name="Approved2" size="10" class="InputBox" value="<%=(EXIREG.Fields.Item("APPROVED2BY").Value)%>" readonly=true>
              &nbsp;&nbsp; 
              <input type="hidden" name="ApprName2" size="30" class="InputBox" value="<%=(EXIREG.Fields.Item("APPRNAME2").Value)%>">
              &nbsp;&nbsp;&nbsp; 
              <% if (EXIREG.Fields.Item("DATEAPPROVED2").Value<>"") then %>
              <img src="images/check.jpg" width="18" height="17">&nbsp;Approved 
              &nbsp;&nbsp;<%= DoDateTime((EXIREG.Fields.Item("DATEAPPROVED2").Value), 2, 2070) %> 
              <% end if %>
              <input type="hidden" name="InvAmtNonPo2">
              <input type="hidden" name="InvAmtPo2">
            </td>
          </tr>
          <tr valign="middle" id="Authorise"> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b>Authorised By:</b>&nbsp;</div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> <%=(EXIREG.Fields.Item("AUTHORISEDBY").Value)%> - <%=(EXIREG.Fields.Item("AUTHNAME").Value)%>
              <input type="hidden" name="reqAuthorised" size="10" class="InputBox" value="<%=(EXIREG.Fields.Item("AUTHORISEDBY").Value)%>" readonly=true>
              &nbsp;&nbsp; 
              <input type="hidden" name="AuthoName" size="30" class="InputBox" value="<%=(EXIREG.Fields.Item("AUTHNAME").Value)%>">
              &nbsp; &nbsp; 
              <% if (EXIREG.Fields.Item("DATEAUTHORISED").Value<>"") then %>
              <img src="images/check.jpg" width="18" height="17">&nbsp;Authorised 
              &nbsp;&nbsp;<%= DoDateTime((EXIREG.Fields.Item("DATEAUTHORISED").Value), 2, 2070) %> 
              <% end if %>
              <input type="hidden" name="InvAmtPo3">
              <input type="hidden" name="InvAmtNonPo3">
            </td>
          </tr>
          <% if (EXIREG.Fields.Item("APPROVEDBY").Value<>"") then %>
          <% end if %>
          <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Current Location:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td colspan="4" height="25"><b><%=(EXIREG.Fields.Item("LOCNAME").Value)%></b></td>
          </tr>
		  <tr> 
            <td width="15%" bgcolor="#dedede" height="25"> 
              <div align="right"><b>Change Location:&nbsp;</b></div>
            </td>
            <td width="2%" height="25">&nbsp;</td>
            <td colspan="4" height="25">
				<table cellpadding="2" style="border:1px solid black;">
					<tr>
						<td>
							 <input type="text" name="txtlocid" size="10" class="InputBox" value="<%=(EXIREG.Fields.Item("LOCATIOn").Value)%>" readOnly=true>
							 <input type="button" name="Submit3" value=" ... " onClick="openpopup('EmpListOut.asp?fName=form1.txtlocid&fName2=form1.txtlocname');" class="sbttn" >
							 <input type="text" name="txtlocname" size="30" class="InputBox" value="<%=(EXIREG.Fields.Item("LOCNAME").Value)%>">
							 <input type="button" value=" Execute " class="sbttn" onClick="openpopup('changelocationproc.asp?seqnum=<%=(EXIREG.Fields.Item("SEQNUM").Value)%>&id=' + document.form1.txtlocid.value + '&loc=' + document.form1.txtlocname.value);">
						</td>
					</tr>
				</table>
				
			</td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"><b>Users Comments:</b></td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> 
              <textarea name="Comments1" cols="80" rows="8" class="MemoBox" readonly="true"><%=(EXIREG.Fields.Item("COMMENTS").value)%></textarea>
            </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td colspan="4">&nbsp; </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> 
              <table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#999999">
                <tr bgcolor="#D1DDEF"> 
                  <td width="6%"> 
                    <div align="center"><b>No.</b></div>
                  </td>
                  <td width="15%"> 
                    <div align="center"><b>Date</b></div>
                  </td>
                  <td> 
                    <div align="center"><b>Description</b></div>
                  </td>
                  <td width="13%"> 
                    <div align="center"><b>Department</b></div>
                  </td>
                  <td width="13%"> 
                    <div align="center"><b>Update By</b></div>
                  </td>
                </tr>
                <% dim Incr 
				 Incr = 1 %>
                <% 
While ((Repeat1__numRows <> 0) AND (NOT InvHist.EOF)) 
%>
                <tr bgcolor="#FFFFFF"> 
                  <td width="6%"> 
                    <div align="center"><%= Incr %></div>
                  </td>
                  <td width="15%"> 
                    <div align="center"><%= DoDateTime((InvHist.Fields.Item("UPDATESTAMP").Value), 1, 2057) %></div>
                  </td>
                  <td><%=(InvHist.Fields.Item("TRDESCR").Value)%>&nbsp;<%=(InvHist.Fields.Item("LOCNAME").Value)%></td>
                  <td width="13%"><%=(InvHist.Fields.Item("DEPARTMENT").Value)%></td>
                  <td width="13%"><%=(InvHist.Fields.Item("UPDATEUSER").Value)%></td>
                </tr>
                <% Incr = Incr + 1
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  InvHist.MoveNext()
Wend
%>
              </table>
            </td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td width="30%">&nbsp;</td>
            <td width="15%" bgcolor="#FFFFFF">&nbsp;</td>
            <td width="2%">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr> 
            <td width="15%" bgcolor="#dedede"> 
              <div align="right"><b>Action:&nbsp;</b></div>
            </td>
            <td width="2%">&nbsp;</td>
            <td colspan="4"> 
              <input type="submit" name="btnRoute" value="Send Reminder " class="sbttn">
              <div align="right"><b> </b></div>
            </td>
          </tr>
        </table>
      </form>
    </td>
  </tr>
</table>
</body>
</html>
<%
InvHist.Close()
%>
<%
Verification.Close()
%>
<%
EXIREG.Close()
%>
